package models

import (
	"gorm.io/datatypes"
)

// MaRobotReport [...]
type MaRobotReport struct {
	ID                    string         `gorm:"autoIncrement:true;primaryKey;column:id;type:int(10);not null" json:"id" json_old:"ID"`
	RobotName             string         `gorm:"uniqueIndex:Date_RobotName;column:robot_name;type:varchar(50);not null;comment:机器名称" json:"robot_name" json_old:"RobotName"`
	Date                  datatypes.Date `gorm:"uniqueIndex:Date_RobotName;column:date;type:date;not null;comment:日期" json:"date" json_old:"Date"`
	SalesID               string         `gorm:"column:sales_id;type:varchar(255);not null;default:'';comment:机器识别码" json:"sales_id" json_old:"SalesID"`
	ShopID                string         `gorm:"column:shop_id;type:bigint;not null;comment:商户ID" json:"shop_id" json_old:"ShopID"`
	Areas3                string         `gorm:"column:areas3;type:bigint;not null" json:"areas3" json_old:"Areas3"`
	TotalTaskDuration     int64          `gorm:"column:total_task_duration;type:int(10);not null;default:0;comment:任务时长，单位毫秒" json:"total_task_duration" json_old:"total_task_duration"`
	TotalTaskOdometer     int64          `gorm:"column:total_task_odometer;type:int(10);not null;default:0;comment:任务里程,单位厘米" json:"total_task_odometer" json_old:"total_task_odometer"`
	TotalChargingDuration int64          `gorm:"column:total_charging_duration;type:int(10);not null;default:0;comment:充电时长，单位秒" json:"total_charging_duration" json_old:"total_charging_duration"`
	TotalIdleDuration     int64          `gorm:"column:total_idle_duration;type:int(10);not null;default:0;comment:闲置时长, 单位秒" json:"total_idle_duration" json_old:"total_idle_duration"`
	Event                 int64          `gorm:"column:event;type:int(10);not null;default:0;comment:事件" json:"event" json_old:"event"`
	ExitNum               int64          `gorm:"column:exit_num;type:int(10);not null;default:0;comment:出场次数" json:"exit_num" json_old:"exit_num"`
	Emergency             int64          `gorm:"column:emergency;type:int(10);not null;default:0;comment:突发事件" json:"emergency" json_old:"emergency"`
	OperationDuration     int64          `gorm:"column:operation_duration;type:int(10);not null;default:0;comment:运营时长，单位毫秒" json:"operation_duration" json_old:"operation_duration"`
	Gmv                   float64        `gorm:"column:gmv;type:decimal(10,2);not null;default:0.00;comment:GMV" json:"gmv" json_old:"GMV"`
	MyPaymentAmount       float64        `gorm:"column:my_payment_amount;type:decimal(10,2);not null;default:0.00;comment:实付金额" json:"my_payment_amount" json_old:"MyPaymentAmount"`
	DiscountAmount        float64        `gorm:"column:dis_count_amount;type:decimal(10,2);not null;default:0.00;comment:优惠金额" json:"dis_count_amount" json_old:"DisCountAmount"`
	MyRefundOrderAmount   float64        `gorm:"column:my_refund_order_amount;type:decimal(10,2);not null;default:0.00;comment:退款金额" json:"my_refund_order_amount" json_old:"MyRefundOrderAmount"`
	Facecount             float64        `gorm:"column:facecount;type:bigint;not null;default:0;comment:曝光量" json:"facecount" json_old:"facecount"`
	ScreenClickNum        int64          `gorm:"column:screen_click_num;type:int(10);not null;default:0;comment:屏幕点击量" json:"screen_click_num" json_old:"ScreenClickNum"`
	ClickNum              int64          `gorm:"column:click_num;type:int(10);not null;default:0;comment:商品点击量" json:"click_num" json_old:"ClickNum"`
	MyStartOrderCount     int64          `gorm:"column:my_start_order_count;type:int(10);not null;default:0;comment:创单笔数" json:"my_start_order_count" json_old:"MyStartOrderCount"`
	MySuccessOrderCount   int64          `gorm:"column:my_success_order_count;type:int(10);not null;default:0;comment:支付笔数" json:"my_success_order_count" json_old:"MySuccessOrderCount"`
	MyNotPayOrderCount    int64          `gorm:"column:my_not_pay_order_count;type:int(10);not null;default:0;comment:未支付笔数" json:"my_not_pay_order_count" json_old:"MyNotPayOrderCount"`
	MyRefundOrderCount    int64          `gorm:"column:my_refund_order_count;type:int(10);not null;default:0;comment:退款笔数" json:"my_refund_order_count" json_old:"MyRefundOrderCount"`
	PayNum                int64          `gorm:"column:pay_num;type:int(10);not null;default:0;comment:支付人数" json:"pay_num" json_old:"PayNum"`
	ClickRate             float64        `gorm:"column:click_rate;type:float;not null;default:0;comment:点击率" json:"click_rate" json_old:"ClickRate"`
	PayRate               float64        `gorm:"column:pay_rate;type:float;not null;default:0;comment:支付率" json:"pay_rate" json_old:"PayRate"`
	CreateRate            float64        `gorm:"column:create_rate;type:float;not null;default:0;comment:创单率" json:"create_rate" json_old:"CreateRate"`
	TotalTaskRunCount     int64          `gorm:"column:total_task_run_count;type:int(10);not null;default:0;comment:任务次数" json:"total_task_run_count" json_old:"total_task_run_count"`
	Facecount0            float64        `gorm:"column:facecount0;type:bigint;default:0" json:"facecount0" json_old:"facecount0"`
	Facecount1            float64        `gorm:"column:facecount1;type:bigint;default:0" json:"facecount1" json_old:"facecount1"`
	Facecount2            float64        `gorm:"column:facecount2;type:bigint;default:0" json:"facecount2" json_old:"facecount2"`
	Facecount3            float64        `gorm:"column:facecount3;type:bigint;default:0" json:"facecount3" json_old:"facecount3"`
	RefundRate            float64        `gorm:"column:refund_rate;type:float(255,0);default:0;comment:退款率" json:"refund_rate" json_old:"RefundRate"`
	MyGiveAmount          float64        `gorm:"column:my_give_amount;type:decimal(10,2);default:0;comment:抽奖赠送" json:"my_give_amount" json_old:"MyGiveAmount"`
	GoodsInventory        int64          `gorm:"column:goods_inventory;type:bigint;default:0;comment:截止昨天机器当前库存" json:"goods_inventory" json_old:"GoodsInventory"`
	GoodsMaxInventory     int64          `gorm:"column:goods_max_inventory;type:bigint;default:0;comment:截止昨天机器的允许最大库存" json:"goods_max_inventory" json_old:"GoodsMaxInventory"`
	Areas3Name            string         `gorm:"column:areas3_name;type:varchar(50);default:0;comment:商场中文名称" json:"areas3_name" json_old:"Areas3Name"`
	OpeningFlag           string         `gorm:"column:opening_flag;type:varchar(50);default:0;comment:新城新店标识" json:"opening_flag" json_old:"OpeningFlag"`
	OpeningTime           string         `gorm:"column:opening_time;type:varchar(50);default:0;comment:新城新店开业时间" json:"opening_time" json_old:"OpeningTime"`
	ProvinceId            string         `gorm:"-" json:"province_id" json_old:"ProvinceId"`
	CityId                string         `gorm:"-" json:"city_id" json_old:"CityId"`
}

// TableName get sql table name.获取数据库表名
func (m MaRobotReport) TableName() string {
	return "ma_robot_report"
}

// 模式自动注册
func init() {
	Models = append(Models, &MaRobotReport{})
}
